import server from "./service";
import {HISTORY} from "./serviceApi.config"


// 提交评论

export function submitComment(update) {
    return server({
        url: HISTORY + "/blog-comment",
        method: 'POST',
        dataType: 'json',
        contentType: 'application/json;charset=UTF-8',
        data: update
    });
}

/**
 * 获取最新的评论列表
 * @param number
 * @returns {AxiosPromise}
 */
export function getLatestBlogComment(number) {
    return server({
        url: HISTORY + "/blog-comment?number=" + number,
        method: 'GET',
        dataType: 'json',
        contentType: 'application/json;charset=UTF-8'
    });
}